<template>
  <div>
    <h1>test页面</h1>
    <Button @click="getData">获取数据</Button>
  </div>
</template>
<script>
import { getUserList } from "@/api/user";
export default {
  methods: {
    getData() {
      console.log("调用接口");
      getUserList().then(res => {
        console.log(res.data);
      });
    }
  }
};
</script>